<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="../Ajs/vue.js"></script>
    <script src="../Ajs/vue.min.js"></script>
</head>
<body>

<div id="box">
    <div>
        <input type="text" v-focus/>
    </div>

    <div>
        <div v-color="{color:'red'}">123</div>
    </div>
</div>


<script>

    var vm = new Vue({
        el:"#box",
        data:{},
        methods:{},
        directives:{
            focus:{
                inserted:function(el){
                    el.focus();
                }
            },
            color:{
                bind:function(el,binding){
                    el.style.color = binding.value.color;
                }
            }
        }
    });




</script>

</body>
</html>
